﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<script runat="server">
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Vendedor
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <form id="form1" runat="server">

<h2>Vendedor</h2>
<head>
    <meta charset="utf-8" />
    <title>jQuery UI Dialog - Modal form</title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
    <script src="../../Scripts/Vendedor.js" type="text/javascript"></script>
    <link rel="Stylesheet" type="text/css" media="screen" href="../../../Content/Vendedor.css" />

</head>


<body>
<!--<div id="botones">
    
    <input id="eliminar" type="submit" value="Eliminar" class="submit-button" />
    <input id="modificar" type="submit" value="Modificar" class="submit-button" />
    <input id="registrar" type="submit" value="Registrar" class="submit-button"/>
    
        
</div>
-->

<div id="Menu">
    <br />
    <h2><%: Html.ActionLink("Registrar Vendedor", "RegistrarVendedor", "ModuloVentas")%>
    </h2>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="Nro_Documento,tipo_documento" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:BoundField DataField="Nombres" HeaderText="Nombres" 
                SortExpression="Nombres" />
            <asp:BoundField DataField="Apellidos" HeaderText="Apellidos" 
                SortExpression="Apellidos" />
            <asp:BoundField DataField="Nro_Documento" HeaderText="Nro_Documento" 
                ReadOnly="True" SortExpression="Nro_Documento" />
            <asp:BoundField DataField="tipo_documento" HeaderText="tipo_documento" 
                ReadOnly="True" SortExpression="tipo_documento" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SoftBully %>" 
        DeleteCommand="DELETE FROM persona" 
        SelectCommand="SELECT Nombres, Apellidos, Nro_Documento, tipo_documento FROM persona WHERE (Nro_Documento IN (SELECT Nro_Documento FROM vendedor)) ORDER BY Nombres">
    </asp:SqlDataSource>
    <br />
    <br />
    <h2><%: Html.ActionLink("Buscar Vendedor", "BuscarVendedor", "ModuloVentas")%></h2>
    <br />
</div>
</body>		
    </form>
</asp:Content>
